package com.tencentcloudapi.apitest;

/* ━━━━━━佛祖保佑━━━━━━
 *                  ,;,,;
 *                ,;;'(    社
 *      __      ,;;' ' \   会
 *   /'  '\'~~'~' \ /'\.)  主
 * ,;(      )    /  |.     义
 *,;' \    /-.,,(   ) \    码
 *     ) /       ) / )|    农
 *     ||        ||  \)
 *     (_\       (_\
 * ━━━━━━永无BUG━━━━━━
 * @author ：zjq
 * @date ：2021/3/28 1:52
 * @description: TODO               查询历史流列表
 * @version: V1.0
 * @slogan: 天下风云出我辈，一入代码岁月催
 */

import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;

import com.tencentcloudapi.live.v20180801.LiveClient;
import com.tencentcloudapi.live.v20180801.models.*;;

import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;

import com.tencentcloudapi.live.v20180801.LiveClient;
import com.tencentcloudapi.live.v20180801.models.*;;

public class DescribeLiveStreamPublishedList
{
    public static void main(String [] args) {
        try{

            Credential cred = new Credential("AKIDVt21kE9tMgTX3IQ5dfqreDtQmusHQdah", "h8LIzUkkZBYgaFhsoeHemeGgsoUv67sO");

            HttpProfile httpProfile = new HttpProfile();
            httpProfile.setEndpoint("live.tencentcloudapi.com");

            ClientProfile clientProfile = new ClientProfile();
            clientProfile.setHttpProfile(httpProfile);

            LiveClient client = new LiveClient(cred, "", clientProfile);

            DescribeLiveStreamPublishedListRequest req = new DescribeLiveStreamPublishedListRequest();
            req.setDomainName("main.livepush.huanbaotech.cn");
            req.setEndTime("2021-03-30T19:00:00Z");
            req.setStartTime("2021-03-20T19:00:00Z");
            req.setAppName("live");
            req.setPageNum(1L);
            req.setPageSize(100L);
            req.setStreamName("mytest");

            DescribeLiveStreamPublishedListResponse resp = client.DescribeLiveStreamPublishedList(req);

            System.out.println(DescribeLiveStreamPublishedListResponse.toJsonString(resp));
        } catch (TencentCloudSDKException e) {
            System.out.println(e.toString());
        }

    }

}
